﻿/**
* File: XmglxmxxController.cs
* Author: 汪杰
* Create Time:2025/2/21 13:52:59
* Email:15200358008@139.com
* 代码由TMCodeGenerator自动生成
**/
using JSLCloud.App.Mes.Service;
using JSLCloud.Models;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace JSLCloud.App.Mes.Controllers
{
    /// <summary>
    /// xm_gl_xmxx Controller
    /// </summary>
    [Route("api/[controller]")]
    [ApiController]
    public class TPmPageConfigController : ControllerBase
    {
        private readonly ITpmpageconfigService _service;
        
        /// <summary>
        /// 默认构造函数
        /// </summary>
        public TPmPageConfigController(ITpmpageconfigService service)
        {
            _service = service;
        }
        
        /// <summary>
        /// 获取xm_gl_xmxx数据表数据
        /// </summary>
        /// <param name="requestObject">返回响应结果</param>
        /// <returns></returns>
        [HttpGet]
        [Route("[action]")]
        public async Task<ResponseObject<List<string>>> GetTableList(string requestObject)
        {
            return await _service.GetTableListAsync();
        }

        /// <summary>
        /// 获取xm_gl_xmxx数据表数据
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        [Route("[action]")]
        public async Task<ResponseObject<List<dynamic>>> GetTableColumns(string tableName)
        {
            return await _service.GetTableColumnsAsync(tableName);
        }


    }
}
